
<?php 
	defined('_JEXEC') or die('Restricted access'); 
	AdminUIHelper::startAdminArea ();
	$lanhdao=JRequest::getInt('lanhdao');
?>
<style>
<!--
.frontlist td
{
text-align:left;
font-size:16px;
}
.frontlist td a:link    {color:#00527A;}
.frontlist td a:visited {color:blue;}
.frontlist td a:hover   {color:red;}
.frontlist td a:active  {color:yellow;}
.frontlist td a {text-decoration:none;font-family:"Times New Roman", Times, serif;}
.frontlist th
{
background-color:green;
height:30px;
font-size:20px;
text-indent:7px;
}
.frontlist
{
width:100%;
color:white;
margin-left:10px;
margin-top:0px;
}
-->
</style>
<form name='adminFront' class="tableFront" action='index.php?option=com_svquanlycanbo&view=donviquanly' method='post'>
	<div id="editcell">
			<table class='frontlist'>
			<thead>
				<tr>
					<th width="50">   Danh sach phong ban</th>
				</tr>
			</thead>
			<tbody>
				<?php 
					foreach($this->donviList as $record)
					{
						echo '<tr class="row'.$i.'">';
							echo '<td width="150">
									<a href="index.php?option=com_svquanlycanbo&view=donviquanly&id='.$record->dvql_id.'" ><b># '.$record->dvql_ten.'</b></a>';
								//--------------
								if($lanhdao==1)
								{
									foreach($this->giamdocList as $enti)
									{
										if($enti->dvql_id==$record->dvql_id)
											echo '<div width="200px" style="text-indent:30px">
											<a  style="color:red"  href="index.php?option=com_svquanlycanbo&view=canbo&id='.$enti->cb_id.'" >o Lãnh đạo đơn vị : '.$enti->cb_ten.'</a>
											</div>';
									}	
								}
								//--------------
							       //--------------
									foreach($this->phongbanList as $re)
									{
										if($re->pb_iddonviquanly==$record->dvql_id)
										{
											echo '<div width="200px" style="text-indent:30px">
											<a href="index.php?option=com_svquanlycanbo&view=phongban&id='.$re->pb_id.'" >+ '.$re->pb_ten.'</a>
											</div>';
										//--------------
										if($lanhdao==1)
										{
											foreach($this->lanhdaophongList as $entity)
											{
												if($entity->pb_id==$re->pb_id)
													echo '<div width="200px" style="text-indent:50px">
													<a style="color:red" href="index.php?option=com_svquanlycanbo&view=canbo&id='.$entity->cb_id.'" >o Lãnh đạo phòng : '.$entity->cb_ten.'</a>
													</div>';
											}	
										}
										}
										//--------------
									}
									//--------------
							echo '</td>';
						echo '</tr>';	
					}

				?>
			</tbody>
		</table>
	</div>
</form>